package com.stulab.sofarpc.consumer;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alipay.sofa.runtime.api.annotation.SofaReference;
import com.alipay.sofa.runtime.api.annotation.SofaReferenceBinding;
import com.stulab.sofarpc.api.HelloService;

/*
http://localhost:8080/hello
 */
@RestController
public class HelloResource {

	@SofaReference(interfaceType = HelloService.class, binding = @SofaReferenceBinding(bindingType = "bolt"))
	HelloService helloService;

	
	@RequestMapping("/hello")
	public String hello() {
		return helloService.hello();
	}
	
}
